<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>

<head>
  <title>商品详情</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <!-- 引入样式 -->
  <!-- <link rel="stylesheet" href="lib/elementui/theme-chalk/index.css" type="text/css"> -->
  <!-- 引入样式 -->
  <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
  <link rel="stylesheet" href="./static/css/style.css">
  <style>
    #app {
      height: 1200px;
      background-color: rgb(151, 151, 151);
    }

    .container {

      height: 900px;
      margin: 0 auto;
      width: 800px;
      border-style: groove;
    }

    .row1 {
      text-align: center;
    }

    .tishi1 {
      font-size: 30px;
      color: white;
    }

    .name {
      font-size: 30px;
      color: white;
    }

    image {
      width: 300px;
      height: 500px;

    }

    .row2 {
      display: flex;
      flex-direction: row;
    }

    .column2 {
      font-size: 26px;
      color: white;
    }

    .tishi2 {
      margin-left: 16px;
      color: white;
    }

    .tishi3 {
      margin-left: 16px;
      color: white;
    }

    .tishi4 {
      margin-left: 16px;
      color: white;
    }

    .tishi5 {
      margin-left: 16px;
      color: white;
    }

    .juqing {
      margin-left: 16px;
    }

    .returnIndex {
      width: 100px;
      height: 30px;
      color: grey;
      margin-top: 30px;
      margin-left: 300px;
    }

    .comment {
      width: 100px;
      height: 30px;
      color: grey;
      margin-top: 30px;
      margin-left: 300px;
    }

    input {
      height: 40px;
      margin-left: 40px;
      margin-top: 30px;
    }
  </style>
</head>

<body>
  <div id="app">
    <div class="container">
      <div class="row1">
        <span class="tishi1">片名：</span>
        <span class="name">{{movieinfo.name}}</span>
      </div>
      <div class="row2">
        <div class="column1">
          <image style="width: 300px; height: 600p;" :src="movieinfo.postimg"></image>
        </div>
        <div class="column2">

          <span class="tishi2">类型:</span>
          <span class="type">{{movieinfo.cateid}}</span>
          <div>
            <span class="timeOn">上线时间：</span>{{movieinfo.opentime}}
            <span class="timeOn">下线时间：</span>{{movieinfo.endtime}}
          </div>
          <div class="tishi5">剧情简介：</div>
          <textarea rows="10" cols="80" class="juqing">{{movieinfo.info}}</textarea>
        </div>
      </div>
      <div class="row3">
        <el-button class="returnIndex" @click="goback">返回主页</el-button>
      </div>
    </div>
  </div>


  <!-- import Vue before Element -->
  <script src="https://unpkg.com/vue/dist/vue.js"></script>
  <!-- import JavaScript -->
  <script src="https://cdn.bootcss.com/axios/0.19.2/axios.js"></script>

  <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  <script>
    new Vue({
      el: '#app',
      data: {

        alertUser: false,
        alertForm: {

        },
        ruleForm: {

        },
        comment: "",
        userbase: {},
        tabPosition: "left",
        movielist: [],
        movieinfo: {},
        commentlist: [],
      },
      mounted() {
        this.getMoveInfo();
      },
      methods: {
        getMoveInfo() {
          var parmid = this.GetQueryValue("id")
          axios.post("/movie/getMovie", { id: parmid }).then(res => {
            console.log(res)
            this.movieinfo = res.data.data;

          })
        },
        GetQueryValue(queryName) {
          var query = decodeURI(window.location.search.substring(1));
          var vars = query.split("&");
          for (var i = 0; i < vars.length; i++) {
            var pair = vars[i].split("=");
            if (pair[0] == queryName) { return pair[1]; }
          }
          return null;
        },
        goback() {
          window.location.href = "/index.jsp"
        }
      }
    })
  </script>

</html>